﻿namespace IOP.Protocols.MQTT
{
    /// <summary>
    /// 控制报文类型
    /// </summary>
    public enum ControlPacketType
    {
        /// <summary>
        /// 保留
        /// </summary>
        RESERVED = 0,
        /// <summary>
        /// 连接
        /// </summary>
        CONNECT = 1,
        /// <summary>
        /// 连接回执
        /// </summary>
        CONNACK,
        /// <summary>
        /// 发布消息
        /// </summary>
        PUBLISH,
        /// <summary>
        /// QoS 1消息发布收到确认 
        /// </summary>
        PUBACK,
        /// <summary>
        /// 发布收到（保证交付第一步）
        /// </summary>
        PUBREC,
        /// <summary>
        /// 发布释放（保证交付第二步）
        /// </summary>
        PUBREL,
        /// <summary>
        /// QoS 2消息发布完成（保证交互第三步）
        /// </summary>
        PUBCOMP,
        /// <summary>
        /// 客户端订阅请求
        /// </summary>
        SUBSCRIBE,
        /// <summary>
        /// 订阅请求报文确认
        /// </summary>
        SUBACK,
        /// <summary>
        /// 客户端取消订阅请求 
        /// </summary>
        UNSUBSCRIBE,
        /// <summary>
        /// 取消订阅报文确认 
        /// </summary>
        UNSUBACK,
        /// <summary>
        /// 心跳请求 
        /// </summary>
        PINGREQ,
        /// <summary>
        /// 心跳响应
        /// </summary>
        PINGRESP,
        /// <summary>
        /// 客户端断开连接
        /// </summary>
        DISCONNECT
    }
}
